home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / graph_pl.exe / GRAPH!.DOC < prev    next >
Text File  |  1992-02-07  |  18KB  |  511 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                      GRAPH!
  8.                            Turbo C Graphing Functions
  9.                                   Version 1.00
  10.                       Copyright (C) 1992 By Paul Lapsansky
  11.                               ALL RIGHTS RESERVED
  12.  
  13.  
  14.          i. CONTENTS
  15.  
  16.              i.   CONTENTS
  17.              I.   INTRODUCTION
  18.                   1.  What is supported
  19.                   2.  Registration
  20.                       a.  Non-registered users
  21.                       b.  Registered users
  22.              II.  GRAPHING FUNCTIONS
  23.                   1.  Bargraph and Bargraph3d
  24.                       a.  driver
  25.                       b.  num_pts
  26.                       c.  data
  27.                       d.  max
  28.                       e.  font
  29.                       f.  pattern
  30.                       g.  color
  31.                       h.  x_label
  32.                       i.  y_label
  33.                       j.  title
  34.                       k.  x_values
  35.                       l.  size
  36.                   3.  Piechart
  37.                       a.  driver
  38.                       b.  num_pts
  39.                       c.  data
  40.                       d.  pattern
  41.                       e.  font
  42.                       f.  title
  43.                       g.  footnote
  44.                       h.  labels
  45.              III. COMPILING AND LINKING
  46.              IV.  ERROR CODES
  47.              V.   ORDER FORM
  48.  
  49.          I.  INTRODUCTION
  50.  
  51.              Turbo C provides a set of powerful graphing functions for
  52.              creating bargraphs and piecharts.  GRAPH! builds on these
  53.              functions to create a new set of graphing functions which
  54.              provide a complete graph from a single line automatically
  55.              scaled to fit to different display types.
  56.  
  57.              1.  What is supported.
  58.  
  59.                  GRAPH! is written completely in Turbo C.  It requires
  60.                  Turbo C version 1.5 or higher, Turbo C++ or Borland
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                  C++ and the appropriate BGI files.  Also required for
  74.                  obvious reasons, CGA, EGA, VGA or Hercules display.
  75.  
  76.                  This version of GRAPH! supports the compact memory
  77.                  model.  Registered users of GRAPH! will receive the
  78.                  tiny, small, medium, large and huge memory models.
  79.  
  80.              2.  Registration.
  81.  
  82.                  a.  Non-registered users.
  83.  
  84.                      You may freely redistribute this archive, so long
  85.                      as it is distributed intact and unmodified.
  86.                      You may use this library in programs for your own
  87.                      personal use.  You may not distribute programs
  88.                      linked with this library.
  89.  
  90.                  b.  Registered users.
  91.  
  92.                      A $15 registration fee includes all the GRAPH!
  93.                      libraries for all memory models.  A $30
  94.                      registration fee includes all of the previous
  95.                      plus source code for all three GRAPH! functions.
  96.  
  97.                      Registered users may distribute programs linked
  98.                      with the original or modified GRAPH! libraries
  99.                      without further royalties.
  100.  
  101.          II.  GRAPHING FUNCTIONS
  102.  
  103.               1.  Bargraph and Bargraph3d
  104.  
  105.                   int bargraph(int driver, int num_pts, float[25]
  106.                                data, float max, int font, int pattern,
  107.                                int color, char[20] x_label, char[20]
  108.                                y_label, char[20] title, char[25][10]
  109.                                x_values, int size).
  110.  
  111.                   int bargraph3d(int driver, int num_pts, float[25]
  112.                                  data float max, int font, int
  113.                                  pattern, int color, char[20] x_label,
  114.                                  char[20] y_label, char[20] title,
  115.                                  char[25][10] x_values, int size).
  116.  
  117.                   a.  driver sets the display type.  It requires and
  118.                       uses the BGI driver files.  The display is auto-
  119.                       matically set to the highest possible resolution
  120.                       for the driver.
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.                         Macro            Value           Resolution
  141.                       ------------------------------------------------
  142.                       DETECT               0          highest possible
  143.                       CGA                  1          640x200 2 color
  144.                       MCGA                 2          640x480 2 color
  145.                       EGA                  3          640x350 16 color
  146.                       EGA64                4          640x350 4 color
  147.                       EGAMONO              5          640x350 2 color
  148.                       HERCMONO             7          720x348 2 color
  149.                       ATT400               8          640x400 2 color
  150.                       VGA                  9          640x480 16 color
  151.                       PC3270              10          720x350 2 color
  152.  
  153.                   b.  num_pts is set to the number of data points that
  154.                       will be plotted.  The maximum number of points
  155.                       possible is 25.
  156.  
  157.                   c.  data is an array that holds the data to be
  158.                       plotted.  The maximum number of data points is
  159.                       25.
  160.  
  161.                   d.  max holds the max possible value on the y-axis.
  162.                       If this value is set to 0 then the largest data
  163.                       point will be used.
  164.  
  165.                   e.  font is set to the desired BGI text style.
  166.  
  167.                         Macro            Value           Meaning
  168.                       ----------------------------------------------
  169.                       DEFAULT_FONT         0        8x8 bit-mapped
  170.                       TRIPLEX_FONT         1        Stroked triplex
  171.                       SMALL_FONT           2        Small stroked
  172.                       SANS_SERIF_FONT      3        Stroked sans serif
  173.                       GOTHIC_FONT          4        Stroked gothic
  174.  
  175.                   f.  pattern is set to the desired fill pattern.
  176.  
  177.                         Macro            Value           Meaning
  178.                       ----------------------------------------------
  179.                       EMPTY_FILL           0        Background color
  180.                       SOLID_FILL           1        Solid color
  181.                       LINE_FILL            2        Lines
  182.                       LTSLASH_FILL         3        Light slashes
  183.                       SLASH_FILL           4        Slashes
  184.                       BKSLASH_FILL         5        Backslashes
  185.                       LTBKSLASH_FILL       6        Light backslashes
  186.                       XHATCH_FILL          8        Hatching
  187.                       INTERLEAVE_FILL      9        Interleaving
  188.                       WIDEDOT_FILL        10        Widely spaced dots
  189.                       CLOSEDOT_FILL       11        Close dots
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                   g.  color is set to the desired fill color.
  207.  
  208.                                Macro            Value
  209.                              --------------------------
  210.                              BLACK                0
  211.                              BLUE                 1
  212.                              GREEN                2
  213.                              CYAN                 3
  214.                              RED                  4
  215.                              MAGENTA              5
  216.                              BROWN                6
  217.                              LIGHTGRAY            7
  218.                              DARKGRAY             8
  219.                              LIGHTBLUE            9
  220.                              LIGHTGREEN          10
  221.                              LIGHTCYAN           11
  222.                              LIGHTRED            12
  223.                              LIGHTMAGENTA        13
  224.                              YELLOW              14
  225.